﻿using System;
using System.Web.UI;

namespace ShoppingCart.WebSite.WebControls
{
    public partial class Progress : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var step = Session["Step"];
            if(step == null)
            {
                litProgress1.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/reg1.gif\" /><strong>Seleccionar Productos</strong>";
                litProgress2.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog2b.gif\" />Registrar su Cuenta";
                litProgress3.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog3b.gif\" />Realizar Pedido";
                return;
            }
            switch (step.ToString())
            {
                case "1":
                    litProgress1.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/reg1.gif\" /><strong>Seleccionar Productos</strong>";
                    litProgress2.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog2b.gif\" /><a href=\"Registrar.aspx\">Registrar su Cuenta</a>";
                    litProgress3.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog3b.gif\" /><a href=\"Carrito.aspx\">Realizar Pedido</a>";
                    break;
                case "2":
                    litProgress1.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog1b.gif\" /><a href=\"Default.aspx\">Seleccionar Productos</a>";
                    litProgress2.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/reg2.gif\" /><strong>Registrar su Cuenta</strong>";
                    litProgress3.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog3b.gif\" /><a href=\"Carrito.aspx\">Realizar Pedido</a>";
                    break;
                case "3":
                    litProgress1.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog1b.gif\" /><a href=\"Default.aspx\">Seleccionar Productos</a>";
                    litProgress2.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/prog2b.gif\" /><a href=\"Registrar.aspx\">Registrar su Cuenta</a>";
                    litProgress3.Text = "<img class=\"prognumber\" alt=\"\" src=\"Style/images/wizard/reg3.gif\" /><strong>Realizar Pedido</strong>";
                    break;
                default:
                    break;
            }
        }
    }
}